﻿using UnityEngine;
using System.Collections;
using CHFramework;
using UnityEngine.UI;

public class UICreatePanel : BaseUI 
{
    public Button StartGameBtn;
    public Button ReturnBtn;

	private void Awake () 
	{
        base.CurrentUIType.PanelType = UIPanelType.Normal;
        base.CurrentUIType.ShowMode = UIPanelShowMode.HideOther;

        EventTriggerListener.Get(StartGameBtn.gameObject).onClick = OnEnterMain;
        EventTriggerListener.Get(ReturnBtn.gameObject).onClick = OnReturn;
	}

    public void OnEnterMain(GameObject sender)
    {
        UIManager.Instance.ShowUIPanel(EnumPanel.UIMainPanel);
        UIManager.Instance.ShowUIPanel(EnumPanel.UITopMainPanel);
    }

    public void OnReturn(GameObject sender)
    {
        UIManager.Instance.CloseUIPanel(EnumPanel.UICreatePanel);
    }
}
